<template>
	<view class="container">
	<uni-section title="图" type="line">
				<image :src="'http://localhost:8090'+data.icon" style="width:100%;height:200px"></image>
			</uni-section>
			<uni-section title="名称" type="line">
				{{data.name}}
			</uni-section>
			<uni-section title="烤鸭" type="line">
				{{data.type}}
			</uni-section>
			<uni-section title="价格" type="line">
				{{data.price}}
			</uni-section>
			<uni-section title="描述" type="line">
				{{data.description}}
			</uni-section>
			<view class="c">
			<uni-easyinput placeholder="请输入评论内容" />
			<button type="default" size="mini">发表</button></view>
		</view>
	</template>
	
	<script>
		export default {
			data() {
				return {
					data: {
						"id": 1
					}
				}
			},
			methods: {
	
			},
			onLoad() {
				uni.request({
					url: 'http://localhost:8090/foodapp/food/findone',
					method: 'post',
					data: this.data,
					success: res => {
						if (res.data.success) {
							this.data = res.data.data
						}
					},
					fail: () => {},
					complete: () => {}
				});
			}
		}
	</script>
<style>
	.c{
		  display: flex;
		  justify-content: flex-start;
	}
</style>
